import Axios from "@/utils/request";
import type { HttpResponse } from '@/api/types';

// login
export default {
  // 登录
  getLogin(params: any): Promise<HttpResponse> {
    return Axios('http://hxbfb.bailingkeji.com/login/maintain-auth-code', {
      method: 'get',
      params: {
        ...params
      }
    })
  },
  // 登出
  getLogout(params: any): Promise<HttpResponse> {
    return Axios('http://hxbfb.bailingkeji.com/login/logout', {
      method: 'get',
    })
  },
  // 发送验证码
  getMaintainSendSms(params: any): Promise<HttpResponse> {
    return Axios.post('http://hxbfb.bailingkeji.com/login/maintain-send-sms', params)
  },
  // 验证验证码，后修改密码
  getMaintainUpdatePassword(params: any): Promise<HttpResponse> {
    return Axios.post('http://hxbfb.bailingkeji.com/login/maintain-update-password', params)
  },
  // 站内信消息列表
  getMessageList(params: any): Promise<HttpResponse> {
    return Axios.post('http://hxbfb.bailingkeji.com/maintain/maintain/message-list', params)
  },
  // 站内信消息列表总数
  getMessageListCount(params: any): Promise<HttpResponse> {
    return Axios.post('http://hxbfb.bailingkeji.com/maintain/maintain/message-count', params)
  },
  // header 登录后修改密码
  setUpdatePassword(params: any): Promise<HttpResponse> {
    return Axios.post('http://hxbfb.bailingkeji.com/maintain/maintain/update-password', params)
  },
}
